
--
-- @Author:      feilong
-- @DateTime:    2019-12-16 11:02:03
-- @Description: 服务器所有错误码与描述

--
-- @Author:      feilong
-- @DateTime:    2019-10-30 23:05:48
-- @Description: 错误误

local ErrorCode = class("ErrorCode")

ErrorCode.user_name_error 			= 1
ErrorCode.password_error 			= 2
ErrorCode.user_not_exist 			= 3
ErrorCode.user_update_fail 			= 4
ErrorCode.user_has_exist 			= 5
ErrorCode.sql_error 				= 6
---------------------------------------------------------
-- Private
---------------------------------------------------------
function ErrorCode:ctor()
	self.code = {
		[self.user_name_error] = "用户名错误",
		[self.password_error] = "密码错误",
		[self.user_not_exist] = "用户不存在",
		[self.user_update_fail] = "用户信息更新失败",
		[self.user_has_exist] = "用户已存在,添加失败",
		[self.sql_error] = "sql操作失败",
	}


	
end

function ErrorCode:getMessage(code)
	if not code then 
		return 
	end
	return self.code[code]
end




return ErrorCode


